package domain;


public class Comment {
	
	private Integer comid;
	private String loginUser;
	private Integer idVideo;
	private String comment;
	private String date;
	
	
	/**
	 * default constructor
	 */
	public Comment(){
		comid=0;
		loginUser="";
		idVideo=0;
		comment="";
		date="";
	}

	/**
	 * @param comid
	 * @param loginUser
	 * @param idVideo
	 * @param comentario
	 * @param date
	 */
	public Comment(Integer _comid, String _loginUser, Integer _idVideo, String _comment, String _date) {
		this.comid = _comid;
		this.loginUser = _loginUser;
		this.idVideo = _idVideo;
		this.comment = _comment;
		this.date=_date;
	}
	
	/**
	 * @return the comid
	 */
	public Integer getComid() {
		return comid;
	}

	/**
	 * @param comid the comid to set
	 */
	public void setComid(Integer comid) {
		this.comid = comid;
	}

	/**
	 * @return the idUsuario
	 */
	public String getLoginUser() {
		return loginUser;
	}

	/**
	 * @param loginUser the idUsuario to set
	 */
	public void setIdUser(String loginUser) {
		this.loginUser = loginUser;
	}

	/**
	 * @return the idVideo
	 */
	public Integer getIdVideo() {
		return idVideo;
	}

	/**
	 * @param idVideo the idVideo to set
	 */
	public void setIdVideo(Integer idVideo) {
		this.idVideo = idVideo;
	}

	/**
	 * @return the comentario
	 */
	public String getComment() {
		return comment;
	}

	/**
	 * @param comment the comentario to set
	 */
	public void setComment(String comment) {
		this.comment = comment;
	}
	
	/**
	 * @return the date
	 */
	public String getDate() {
		return date;
	}

	/**
	 * @param date the date to set
	 */
	public void setDate(String date) {
		this.date = date;
	}

	/* (non-Javadoc)
	 * @see java.lang.Object#hashCode()
	 */
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((comid == null) ? 0 : comid.hashCode());
		result = prime * result + ((comment == null) ? 0 : comment.hashCode());
		result = prime * result + ((date == null) ? 0 : date.hashCode());
		result = prime * result + ((loginUser == null) ? 0 : loginUser.hashCode());
		result = prime * result + ((idVideo == null) ? 0 : idVideo.hashCode());
		return result;
	}

	/* (non-Javadoc)
	 * @see java.lang.Object#equals(java.lang.Object)
	 */
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Comment other = (Comment) obj;
		if (comid == null) {
			if (other.comid != null)
				return false;
		} else if (!comid.equals(other.comid))
			return false;
		if (comment == null) {
			if (other.comment != null)
				return false;
		} else if (!comment.equals(other.comment))
			return false;
		if (date == null) {
			if (other.date != null)
				return false;
		} else if (!date.equals(other.date))
			return false;
		if (loginUser == null) {
			if (other.loginUser != null)
				return false;
		} else if (!loginUser.equals(other.loginUser))
			return false;
		if (idVideo == null) {
			if (other.idVideo != null)
				return false;
		} else if (!idVideo.equals(other.idVideo))
			return false;
		return true;
	}

	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return "Comment [comid=" + comid + ", idUser=" + loginUser + ", idVideo="
				+ idVideo + ", comment=" + comment + ", date=" + date + "]";
	}


	
	

}
